#ifndef __SD03C_H__
#define __SD03C_H__

typedef int SOERR;

#define SOERR_NONE					   0	
#define SOERR_UNKNOWN				  -1
#define SOERR_NO_CAM_DEVICE			-100
#define SOERR_UNINITED				-101
#define SOERR_FAILED_INIT			-102
#define SOERR_INVALID_PARAM 		-103
#define SOERR_WRONG_STATUS  		-104
#define SOERR_FAILED_LIST_RES 		-107
#define SOERR_FAILED_SET_RES 		-108
#define SOERR_FAILED_START_VIDEO_CAP -109


typedef struct tagVideoRes
{
    int  width;
    int  height;
    unsigned int format;
}VideoRes;

typedef struct tagVideoResList
{
	VideoRes *video_res;
	int num_res;
}VideoResList;

typedef enum tagSOCAM_STATUS
{
	SOCAM_STATUS_UNPLUGED	= 0,
	SOCAM_STATUS_STOPPED	= 1,
	SOCAM_STATUS_RUNNING	= 2
}SOCAM_STATUS;

typedef void  (*FN_CAPTURE_CALLBACK)(void *buffer, int buf_len, int64_t ts, void* user_data);
typedef void  (*FN_ERROR_CALLBACK)(char* error_message);

#ifdef __cplusplus
extern "C" {
#endif

SOERR c270_init();
SOERR c270_uninit();
SOERR c270_run(VideoRes *res, FN_CAPTURE_CALLBACK fnCapture, FN_ERROR_CALLBACK fnError, void* user_data);
SOERR c270_stop();
SOCAM_STATUS c270_get_status();
SOERR c270_list_res(VideoResList** res_list);

#ifdef __cplusplus
}
#endif

#endif


